package com.runvp.service.biz.service.impl;

import java.util.List;
import com.runvp.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.runvp.service.biz.mapper.BizIotCardRenewMapper;
import com.runvp.service.biz.domain.BizIotCardRenew;
import com.runvp.service.biz.service.IBizIotCardRenewService;
import com.runvp.common.core.text.Convert;

/**
 * 物联网卡充值记录Service业务层处理
 * 
 * @author runvp
 * @date 2023-04-08
 */
@Service
public class BizIotCardRenewServiceImpl implements IBizIotCardRenewService {
    @Autowired
    private BizIotCardRenewMapper bizIotCardRenewMapper;

    /**
     * 查询物联网卡充值记录
     * 
     * @param id 物联网卡充值记录主键
     * @return 物联网卡充值记录
     */
    @Override
    public BizIotCardRenew selectBizIotCardRenewById(Long id) {
        return bizIotCardRenewMapper.selectBizIotCardRenewById(id);
    }

    /**
     * 查询物联网卡充值记录列表
     * 
     * @param bizIotCardRenew 物联网卡充值记录
     * @return 物联网卡充值记录
     */
    @Override
    public List<BizIotCardRenew> selectBizIotCardRenewList(BizIotCardRenew bizIotCardRenew) {
        return bizIotCardRenewMapper.selectBizIotCardRenewList(bizIotCardRenew);
    }

    /**
     * 新增物联网卡充值记录
     * 
     * @param bizIotCardRenew 物联网卡充值记录
     * @return 结果
     */
    @Override
    public int insertBizIotCardRenew(BizIotCardRenew bizIotCardRenew) {
        bizIotCardRenew.setCreateTime(DateUtils.getNowDate());
        return bizIotCardRenewMapper.insertBizIotCardRenew(bizIotCardRenew);
    }

    /**
     * 修改物联网卡充值记录
     * 
     * @param bizIotCardRenew 物联网卡充值记录
     * @return 结果
     */
    @Override
    public int updateBizIotCardRenew(BizIotCardRenew bizIotCardRenew) {
        return bizIotCardRenewMapper.updateBizIotCardRenew(bizIotCardRenew);
    }

    /**
     * 批量删除物联网卡充值记录
     * 
     * @param ids 需要删除的物联网卡充值记录主键
     * @return 结果
     */
    @Override
    public int deleteBizIotCardRenewByIds(String ids) {
        return bizIotCardRenewMapper.deleteBizIotCardRenewByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除物联网卡充值记录信息
     * 
     * @param id 物联网卡充值记录主键
     * @return 结果
     */
    @Override
    public int deleteBizIotCardRenewById(Long id) {
        return bizIotCardRenewMapper.deleteBizIotCardRenewById(id);
    }
}
